/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.login.plugin.accountBind.view;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Handler;
import android.text.Editable;
import android.text.InputFilter;
import android.text.InputFilter.LengthFilter;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener;
import com.qihoo.gamecenter.sdk.common.view.CustButton;
import com.qihoo.gamecenter.sdk.common.view.CustEditText;
import com.qihoo.gamecenter.sdk.login.plugin.a.j;
import com.qihoo.gamecenter.sdk.login.plugin.a.k;
import com.qihoo.gamecenter.sdk.login.plugin.d.a;
import com.qihoo.gamecenter.sdk.login.plugin.h.e;
import com.qihoo.gamecenter.sdk.login.plugin.h.f;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;

public class VerifyPhoneNumberDialog extends RelativeLayout {
    protected com.qihoo.gamecenter.sdk.login.plugin.f.a a;
    protected Activity b;
    protected String c;
    protected Intent d;
    private b q;
    protected RelativeLayout e;
    private VerifyProgress r;
    protected CustEditText f;
    protected View g;
    protected CustButton h;
    protected LinearLayout i;
    protected LinearLayout j;
    protected TextView k;
    protected String l;
    private String s;
    protected String m;
    protected ImageView n;
    private String t;
    private boolean u = false;
    protected LinearLayout o;
    private ArrayList v = new ArrayList();
    protected View.OnClickListener p = new View.OnClickListener() {
        public void onClick(View paramView) {
            if (VerifyPhoneNumberDialog.this.h == paramView) {
                if (VerifyPhoneNumberDialog.a(VerifyPhoneNumberDialog.this))
                    VerifyPhoneNumberDialog.this.e();
                else
                    VerifyPhoneNumberDialog.this.g();
            }
            else {
                if (VerifyPhoneNumberDialog.this.j != paramView)
                    return;
                VerifyPhoneNumberDialog.this.b();
            }
        }
    };

    public VerifyPhoneNumberDialog(Activity paramActivity, String paramString, Intent paramIntent, b paramb) {
        super(paramActivity);
        this.b = paramActivity;
        this.c = paramString;
        this.d = paramIntent;
        this.q = paramb;
        this.a = com.qihoo.gamecenter.sdk.login.plugin.f.a.a(this.b);
        g(paramActivity);
    }

    public void setVerifyProgress(VerifyProgress paramVerifyProgress) {
        this.r = paramVerifyProgress;
    }

    public void a(Map paramMap) {
        setVisibility(0);
        this.f.requestFocus();
    }

    private void g(Context paramContext) {
        setLayoutParams(new ViewGroup.LayoutParams(-1, -2));
        this.e = new RelativeLayout(paramContext);
        this.e.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        addView(this.e);
        this.e.addView(b(paramContext));
        this.e.addView(c(paramContext));
        a(paramContext);
        h();
    }

    protected void a(Context paramContext) {
        this.e.addView(d(paramContext));
        this.e.addView(e(paramContext));
        this.e.addView(f(paramContext));
    }

    private void h() {
        String str = f.e(this.b);
        e.a("VerifyPhoneNumberDialog", new Object[] { "current phone number = " + str });
        if (TextUtils.isEmpty(str))
            b();
        else
            a();
    }

    public void a() {
        if (this.o != null)
            this.o.setVisibility(8);
        if (this.i != null)
            this.i.setVisibility(0);
        if (this.j != null)
            this.j.setVisibility(0);
        if (this.h == null)
            return;
        this.h.setText(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bn));
    }

    public void b() {
        if (this.o != null)
            this.o.setVisibility(0);
        if (this.h != null)
            this.h.setText(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bi));
        if (this.i != null)
            this.i.setVisibility(8);
        if (this.j != null)
            this.j.setVisibility(8);
        this.l = "";
        this.f.setText("");
        new Handler().postDelayed(new Runnable() {
            public void run() {
                View localView = VerifyPhoneNumberDialog.this.b.getCurrentFocus();
                if (localView != null)
                    localView.clearFocus();
                VerifyPhoneNumberDialog.this.f.requestFocus();
            }
        }, 200L);
    }

    protected LinearLayout b(Context paramContext) {
        LinearLayout localLinearLayout = new LinearLayout(this.b);
        this.k = new TextView(paramContext);
        RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(-1, -2);
        localLayoutParams.bottomMargin = f.a(paramContext, 18.0F);
        localLayoutParams.addRule(3, a.c.ordinal());
        localLinearLayout.setLayoutParams(localLayoutParams);
        localLinearLayout.setId(a.d.ordinal());
        localLinearLayout.addView(this.k, new RelativeLayout.LayoutParams(-1, -2));
        this.k.setGravity(16);
        String str = this.d.getStringExtra("bind_message");
        this.k.setTextSize(1, com.qihoo.gamecenter.sdk.login.plugin.h.c.l);
        if (TextUtils.isEmpty(str))
            this.k.setText(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bg));
        else
            this.k.setText(str);
        this.k.setTextColor(-16777216);
        return localLinearLayout;
    }

    protected LinearLayout c(Context paramContext) {
        this.l = f.e(this.b);
        this.m = this.l;
        RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(-1, f.a(paramContext, 47.0F));
        localLayoutParams.addRule(3, a.d.ordinal());
        LinearLayout localLinearLayout = new LinearLayout(paramContext);
        localLinearLayout.setLayoutParams(localLayoutParams);
        localLinearLayout.setId(a.e.ordinal());
        localLinearLayout.setOrientation(0);
        localLinearLayout.setGravity(16);
        this.a.a(localLinearLayout, -1073741801);
        localLinearLayout.setPadding(f.a(paramContext, 8.0F), 0, 0, 0);
        TextView localTextView = new TextView(paramContext);
        localTextView.setLayoutParams(new LinearLayout.LayoutParams(-2, -1));
        localTextView.setTextColor(-16777216);
        localTextView.setGravity(16);
        localTextView.setText(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bf));
        localTextView.setTextSize(1, com.qihoo.gamecenter.sdk.login.plugin.h.c.h);
        localLinearLayout.addView(localTextView);
        this.f = new CustEditText(paramContext);
        this.f.setText(this.l);
        this.f.setTextColor(-16777216);
        this.f.setSingleLine(true);
        this.f.setLayoutParams(new LinearLayout.LayoutParams(0, -1, 1.0F));
        this.f.setTextSize(1, com.qihoo.gamecenter.sdk.login.plugin.h.c.h);
        this.f.setGravity(16);
        this.f.setHintTextColor(-3355444);
        this.f.setHint(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bh));
        this.f.setBackgroundColor(0);
        this.f.setInputType(2);
        this.f.setPadding(f.a(paramContext, 8.0F), 0, 0, 0);
        InputFilter[] arrayOfInputFilter = new InputFilter[1];
        arrayOfInputFilter[0] = new InputFilter.LengthFilter(11);
        this.f.setFilters(arrayOfInputFilter);
        this.f.setImeOptions(6);
        this.f.e();
        this.f.f();
        this.f.setOnEditorActionListener(new TextView.OnEditorActionListener() {
            public boolean onEditorAction(TextView paramTextView, int paramInt, KeyEvent paramKeyEvent) {
                if ((((paramInt == 6) || (paramInt == 0)))
                        && (!(TextUtils.isEmpty(VerifyPhoneNumberDialog.this.f.getText().toString()))))
                    VerifyPhoneNumberDialog.this.e();
                return false;
            }
        });
        this.f.c();
        this.f.d();
        this.f.setOnFocusChangeListener(new View.OnFocusChangeListener() {
            public void onFocusChange(View paramView, boolean paramBoolean) {
                e.a("VerifyPhoneNumberDialog", new Object[] { "onFocusChange, hasFocus = " + paramBoolean });
                if (!(paramBoolean))
                    return;
                if (TextUtils.isEmpty(VerifyPhoneNumberDialog.this.l)) {
                    VerifyPhoneNumberDialog.this.f.setSelection(0);
                    VerifyPhoneNumberDialog.this.n.setVisibility(8);
                }
                else {
                    VerifyPhoneNumberDialog.this.f.setSelection(VerifyPhoneNumberDialog.this.l.length());
                    VerifyPhoneNumberDialog.this.n.setVisibility(0);
                }
                String str = f.e(VerifyPhoneNumberDialog.this.b);
                if ((!(TextUtils.isEmpty(str))) || (VerifyPhoneNumberDialog.this.f.getVisibility() != 0))
                    return;
                f.a(VerifyPhoneNumberDialog.this.b, VerifyPhoneNumberDialog.this.f);
            }
        });
        this.f.a();
        this.f.b();
        this.f.addTextChangedListener(new TextWatcher() {
            public void onTextChanged(CharSequence paramCharSequence, int paramInt1, int paramInt2, int paramInt3) {
                if (!(TextUtils.isEmpty(paramCharSequence)))
                    VerifyPhoneNumberDialog.this.n.setVisibility(0);
                else
                    VerifyPhoneNumberDialog.this.n.setVisibility(8);
            }

            public void beforeTextChanged(CharSequence paramCharSequence, int paramInt1, int paramInt2, int paramInt3) {}

            public void afterTextChanged(Editable paramEditable) {
                if (TextUtils.isEmpty(paramEditable))
                    return;
                VerifyPhoneNumberDialog.this.c();
            }
        });
        localLinearLayout.addView(this.f);
        int i1 = f.a(paramContext, 8.0F);
        this.n = new ImageView(paramContext);
        this.n.setLayoutParams(new LinearLayout.LayoutParams(f.a(paramContext, 34.0F), f.a(paramContext, 34.0F)));
        this.a.a(this.n, 1073741835);
        this.n.setVisibility(8);
        this.n.setPadding(i1, i1, i1, i1);
        this.n.setOnClickListener(new View.OnClickListener() {
            public void onClick(View paramView) {
                VerifyPhoneNumberDialog.this.c();
                VerifyPhoneNumberDialog.this.f.setText("");
            }
        });
        localLinearLayout.addView(this.n);
        this.o = localLinearLayout;
        return localLinearLayout;
    }

    protected LinearLayout d(Context paramContext) {
        RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(-1, -2);
        localLayoutParams.addRule(3, a.e.ordinal());
        localLayoutParams.topMargin = f.a(paramContext, 12.0F);
        LinearLayout localLinearLayout = new LinearLayout(paramContext);
        localLinearLayout.setLayoutParams(localLayoutParams);
        localLinearLayout.setOrientation(0);
        localLinearLayout.setGravity(17);
        localLinearLayout.setId(a.f.ordinal());
        this.h = new CustButton(paramContext);
        this.h.setLayoutParams(new LinearLayout.LayoutParams(-1, f.a(this.b, 47.0F)));
        this.h.setGravity(17);
        this.h.setTextColor(-1);
        this.h.setTextSize(1, com.qihoo.gamecenter.sdk.login.plugin.h.c.l);
        this.h.setText(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bi));
        this.h.a();
        this.h.b();
        this.h.setOnClickListener(this.p);
        this.a.a(this.h, -1073741764, -1073741763, -1073741763);
        localLinearLayout.addView(this.h);
        return localLinearLayout;
    }

    protected LinearLayout e(Context paramContext) {
        int i1 = f.a(paramContext, 8.0F) * 2;
        RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(-1, -2);
        localLayoutParams.addRule(3, a.f.ordinal());
        localLayoutParams.topMargin = f.a(paramContext, 4.0F);
        localLayoutParams.leftMargin = i1;
        localLayoutParams.rightMargin = i1;
        this.i = new LinearLayout(paramContext);
        this.i.setPadding(0, 0, 0, f.a(paramContext, 10.0F));
        this.i.setId(a.g.ordinal());
        this.i.setLayoutParams(localLayoutParams);
        this.i.setOrientation(0);
        ImageView localImageView = new ImageView(paramContext);
        int i2 = f.a(paramContext, 15.0F);
        LinearLayout.LayoutParams localLayoutParams1 = new LinearLayout.LayoutParams(i2, i2);
        localLayoutParams1.weight = 0.0F;
        localLayoutParams1.rightMargin = f.a(paramContext, 3.0F);
        localLayoutParams1.topMargin = f.a(paramContext, 3.0F);
        localImageView.setLayoutParams(localLayoutParams1);
        localImageView.setScaleType(ImageView.ScaleType.FIT_XY);
        this.a.a(localImageView, 1073741875);
        this.i.addView(localImageView);
        TextView localTextView = new TextView(paramContext);
        LinearLayout.LayoutParams localLayoutParams2 = new LinearLayout.LayoutParams(-1, -2);
        localLayoutParams2.weight = 1.0F;
        localTextView.setLayoutParams(localLayoutParams2);
        localTextView.setPadding(0, f.a(paramContext, 5.0F), 0, f.a(paramContext, 5.0F));
        localTextView.setSingleLine(false);
        localTextView.setText(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.at));
        localTextView.setLineSpacing(f.a(this.b, 3.0F), 1.0F);
        localTextView.setTextSize(1, com.qihoo.gamecenter.sdk.login.plugin.h.c.i);
        localTextView.setTextColor(Color.parseColor("#999999"));
        this.i.addView(localTextView);
        return this.i;
    }

    protected LinearLayout f(Context paramContext) {
        RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(-1, f.a(this.b, 47.0F));
        localLayoutParams.addRule(3, a.g.ordinal());
        this.j = new LinearLayout(paramContext);
        this.j.setLayoutParams(localLayoutParams);
        this.j.setOrientation(0);
        this.j.setGravity(17);
        this.a.a(this.j, -1073741824, -1073741823, -1073741823);
        TextView localTextView = new TextView(paramContext);
        localTextView.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
        localTextView.setGravity(17);
        localTextView.setTextSize(1, com.qihoo.gamecenter.sdk.login.plugin.h.c.l);
        localTextView.setText(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bo));
        localTextView.setTextColor(Color.parseColor("#9d892c"));
        this.j.addView(localTextView);
        ImageView localImageView = new ImageView(paramContext);
        localImageView.setLayoutParams(new LinearLayout.LayoutParams(-2, -1));
        this.a.a(localImageView, 1073741826);
        this.j.setOnClickListener(this.p);
        return this.j;
    }

    private boolean i() {
        return this.h.getText().equals(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bi));
    }

    protected void a(String paramString) {
        if (this.g != null) {
            localObject = (TextView) this.g.findViewById(10001);
            ((TextView) localObject).setText(paramString);
            return;
        }
        Object localObject = new RelativeLayout(this.b);
        RelativeLayout.LayoutParams localLayoutParams = new RelativeLayout.LayoutParams(-2, -2);
        localLayoutParams.addRule(2, a.e.ordinal());
        this.e.addView((View) localObject, localLayoutParams);
        TextView localTextView = new TextView(this.b);
        localTextView.setId(10001);
        localTextView.setText(paramString);
        localTextView.setTextColor(Color.parseColor("#e46052"));
        this.a.a(localTextView, -1073741766);
        localTextView.setPadding(4, 0, 4, 0);
        localTextView.setTextSize(1, com.qihoo.gamecenter.sdk.login.plugin.h.c.i);
        ((RelativeLayout) localObject).addView(localTextView, new RelativeLayout.LayoutParams(-2, -2));
        localTextView.setVisibility(4);
        localTextView.post(new Runnable(localTextView) {
            public void run() {
                this.a.setVisibility(0);
            }
        });
        this.g = ((View) localObject);
    }

    protected void c() {
        if (this.g == null)
            return;
        this.e.removeView(this.g);
        this.g = null;
    }

    public void d() {
        setVisibility(8);
        if (this.r == null)
            return;
        this.r.a();
    }

    protected void e() {
        c();
        this.l = this.f.getText().toString();
        e.a("VerifyPhoneNumberDialog", new Object[] { "phone number is " + this.l });
        e.a("VerifyPhoneNumberDialog", new Object[] { "local phone number is " + this.m });
        com.qihoo.gamecenter.sdk.login.plugin.accountBind.a.a.a(this.b, false);
        if (!(f.a(this.b, com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.c), this.c)))
            return;
        if (TextUtils.isEmpty(this.l)) {
            a(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bz));
            return;
        }
        if (!(f.c(this.l))) {
            a(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bB));
            return;
        }
        if (this.l.length() != 11) {
            a(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bC));
            return;
        }
        if (!(f.d(this.l))) {
            a(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bB));
            return;
        }
        f.a(this.b);
        if (!(this.l.equals(this.s))) {
            this.q.a(3, -1, null);
        }
        else {
            HashMap localHashMap = new HashMap();
            localHashMap.put("localPhoneNumber", this.m);
            localHashMap.put("phoneNumber", this.l);
            this.q.a(4, -1, localHashMap);
        }
    }

    public void f()
  {
    f.a(this.b);
    this.r.a(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bj));
    k localk = new k(getContext(), null);
    localk.a(this.l, this.l.equals(this.m), false, new j()
    {
      public void a(String paramString)
      {
        VerifyPhoneNumberDialog.a(VerifyPhoneNumberDialog.this, "");
        String str1 = null;
        if (TextUtils.isEmpty(paramString))
        {
          str1 = com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bt);
          VerifyPhoneNumberDialog.b(VerifyPhoneNumberDialog.this, str1);
          return;
        }
        try
        {
          JSONObject localJSONObject = new JSONObject(paramString);
          int i = localJSONObject.optInt("errno", -1);
          String str2;
          if (0 == i)
          {
            VerifyPhoneNumberDialog.a(VerifyPhoneNumberDialog.this, VerifyPhoneNumberDialog.this.l);
            str2 = localJSONObject.optString("smscode", "");
            if (TextUtils.isEmpty(str2))
            {
              VerifyPhoneNumberDialog.b(VerifyPhoneNumberDialog.this);
            }
            else
            {
              VerifyPhoneNumberDialog.c(VerifyPhoneNumberDialog.this, str2);
              VerifyPhoneNumberDialog.c(VerifyPhoneNumberDialog.this);
            }
          }
          else if (1106 == i)
          {
            VerifyPhoneNumberDialog.b(VerifyPhoneNumberDialog.this, com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.do));
          }
          else if (!(VerifyPhoneNumberDialog.d(VerifyPhoneNumberDialog.this)))
          {
            str2 = localJSONObject.optString("errmsg");
            if (TextUtils.isEmpty(str2))
              str2 = com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bt);
            VerifyPhoneNumberDialog.b(VerifyPhoneNumberDialog.this, str2);
          }
          else
          {
            VerifyPhoneNumberDialog.b(VerifyPhoneNumberDialog.this);
          }
        }
        catch (Exception localException)
        {
          e.b("VerifyPhoneNumberDialog", "sms code fetched error!", localException);
        }
      }
    });
  }

    private void j() {
        new AsyncTask() {
            protected String a(Void[] paramArrayOfVoid) {
                String str1 = com.qihoo.gamecenter.sdk.login.plugin.accountBind.a.a.a(VerifyPhoneNumberDialog.this.b,
                        VerifyPhoneNumberDialog.this.l, VerifyPhoneNumberDialog.e(VerifyPhoneNumberDialog.this),
                        com.qihoo.gamecenter.sdk.login.plugin.h.d.d());
                String str2 = com.qihoo.gamecenter.sdk.login.plugin.d.a.a(VerifyPhoneNumberDialog.this.b, str1);
                return str2;
            }

            protected void a(String paramString) {
                e.a("VerifyPhoneNumberDialog", new Object[] { "verifySMSCode is" + paramString });
                if (!(TextUtils.isEmpty(paramString)))
                    try {
                        JSONObject localJSONObject = new JSONObject(paramString);
                        int i = localJSONObject.getInt("errno");
                        e.a("VerifyPhoneNumberDialog", new Object[] { "err  is " + i });
                        if (i == 0)
                            VerifyPhoneNumberDialog.d(VerifyPhoneNumberDialog.this, paramString);
                        else
                            VerifyPhoneNumberDialog.b(VerifyPhoneNumberDialog.this);
                    } catch (JSONException localJSONException) {
                        e.b("VerifyPhoneNumberDialog", localJSONException.getLocalizedMessage());
                        VerifyPhoneNumberDialog.b(VerifyPhoneNumberDialog.this);
                    }
                else
                    VerifyPhoneNumberDialog.b(VerifyPhoneNumberDialog.this);
            }
        }.execute(new Void[0]);
    }

    private void k() {
        HashMap localHashMap = new HashMap();
        localHashMap.put("localPhoneNumber", this.m);
        localHashMap.put("phoneNumber", this.l);
        this.q.a(4, -1, localHashMap);
        this.r.a();
    }

    private void b(String paramString) {
        this.q.a(2, -1, null);
        this.r.a();
        a(paramString);
    }

    private void c(String paramString) {
        com.qihoo.gamecenter.sdk.common.a.c.e(this.l);
        this.r.b(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bx));
        this.r.postDelayed(new Runnable(paramString) {
            public void run() {
                VerifyPhoneNumberDialog.f(VerifyPhoneNumberDialog.this).a();
                VerifyPhoneNumberDialog.g(VerifyPhoneNumberDialog.this).a(6, 1, null);
                HashMap localHashMap = new HashMap();
                localHashMap.put("result", this.a);
                VerifyPhoneNumberDialog.this.b(localHashMap);
            }
        }, 1000L);
    }

    public void g()
  {
    f.a(this.b);
    com.qihoo.gamecenter.sdk.login.plugin.accountBind.a.a.a(this.b, false);
    this.r.a(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bj));
    long l1 = System.currentTimeMillis();
    3 local3 = new com.qihoo.gamecenter.sdk.login.plugin.accountBind.c()
    {
      public void a(Map paramMap)
      {
        try
        {
          JSONObject localJSONObject = new JSONObject((String)paramMap.get("result"));
          int i = localJSONObject.getInt("errno");
          e.a("VerifyPhoneNumberDialog", new Object[] { "reg result code: " + Integer.toString(i) });
          if (i == 0)
          {
            VerifyPhoneNumberDialog.f(VerifyPhoneNumberDialog.this).b(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bx));
            VerifyPhoneNumberDialog.f(VerifyPhoneNumberDialog.this).postDelayed(new Runnable(paramMap)
            {
              public void run()
              {
                VerifyPhoneNumberDialog.f(VerifyPhoneNumberDialog.this).a();
                this.a.put("bind_type", "0");
                VerifyPhoneNumberDialog.this.b(this.a);
              }
            }
            , 1000L);
            com.qihoo.gamecenter.sdk.common.a.c.e(VerifyPhoneNumberDialog.this.l);
          }
          else if (i == 9997)
          {
            VerifyPhoneNumberDialog.this.b();
            VerifyPhoneNumberDialog.f(VerifyPhoneNumberDialog.this).a();
            VerifyPhoneNumberDialog.this.a(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bp));
            VerifyPhoneNumberDialog.this.b(paramMap);
          }
          else if (i == 1108)
          {
            VerifyPhoneNumberDialog.this.b();
            VerifyPhoneNumberDialog.f(VerifyPhoneNumberDialog.this).a();
            VerifyPhoneNumberDialog.this.a(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bq));
            VerifyPhoneNumberDialog.this.b(paramMap);
          }
          else if (i == 1040)
          {
            VerifyPhoneNumberDialog.this.b();
            VerifyPhoneNumberDialog.f(VerifyPhoneNumberDialog.this).a();
            VerifyPhoneNumberDialog.this.a(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.br));
            VerifyPhoneNumberDialog.this.b(paramMap);
          }
          else
          {
            VerifyPhoneNumberDialog.this.b();
            VerifyPhoneNumberDialog.f(VerifyPhoneNumberDialog.this).a();
            VerifyPhoneNumberDialog.this.a(com.qihoo.gamecenter.sdk.login.plugin.d.a(d.a.bs));
            VerifyPhoneNumberDialog.this.b(paramMap);
          }
        }
        catch (Exception localException)
        {
          e.b("VerifyPhoneNumberDialog", "on bind phone res error!", localException);
          VerifyPhoneNumberDialog.f(VerifyPhoneNumberDialog.this).a();
          VerifyPhoneNumberDialog.this.b(paramMap);
        }
      }
    };
    new com.qihoo.gamecenter.sdk.login.plugin.accountBind.b().a(getContext(), this.d, local3);
  }

    public void a(com.qihoo.gamecenter.sdk.login.plugin.accountBind.c paramc) {
        if ((this.v == null) || (this.v.contains(paramc)))
            return;
        this.v.add(paramc);
    }

    public void b(Map paramMap) {
        if (this.v == null)
            return;
        Iterator localIterator = this.v.iterator();
        while (localIterator.hasNext()) {
            com.qihoo.gamecenter.sdk.login.plugin.accountBind.c localc = (com.qihoo.gamecenter.sdk.login.plugin.accountBind.c) localIterator
                    .next();
            localc.a(paramMap);
        }
    }

    public void setTipText(String paramString) {
        if (this.k == null)
            return;
        this.k.setText(paramString);
    }

    public void setMessageBg(Drawable paramDrawable) {
        this.k.setBackgroundDrawable(paramDrawable);
    }
}